<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Hello World</title>
    <script src="../vue.js"></script>
    <link rel="stylesheet" href="../animate.css" />
    <style>
      @keyframes bounce-in {
        0% {
          transform: scale(0);
          opacity: 0;
        }
        50% {
          transform: scale(1.2);
          opacity: 0.7;
        }
        100% {
          transform: scale(1);
          opacity: 1;
        }
      }
      .bounce-enter-active {
        transform-origin: 2% center;
        animation: bounce-in 0.5s;
      }
      .bounce-leave-active {
        transform-origin: 2% center;
        animation: bounce-in 0.5s reverse;
      }

      .fade-enter,
      .fade-leave-to{
        opacity: 0;
      }

      .fade-enter-active,
      .fade-leave-active{
        transition: all 2s;
      }
    </style>
  </head>
  <body>
    <div id="root">
      <transition name="bounce">
        <div v-if="isShow">Hello World - {{ isShow }}</div>
      </transition>

      <button @click="isShow = !isShow">Toggle</button> <br /><br />

      <transition
        :duration="5000"
        name="fade"
        appear
        enter-active-class="animated shake fade-enter-active"
        leave-active-class="animated bounce fade-leave-active"
        appear-active-class="animated bounce"
      >
        <div v-if="isShow2">Hello World2 - {{ isShow }}</div>
      </transition>
      <button @click="isShow2 = !isShow2">Toggle</button>
    </div>
    <script>
      const vm = new Vue({
        el: '#root',
        data: {
          isShow: true,
          isShow2: true
        }
      })
    </script>
  </body>
</html>
